package shell.listener;

import inabit.base.WorkingMemory;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;

import shell.view.windows.NewVariableWindow;
import shell.view.windows.VariablesPanel;
/**@author Rafael Rocha*/
public class OpenAddVarWindowListener implements ActionListener{

	private VariablesPanel varPanel;
	private WorkingMemory wm;
	private JFrame window;
	
	public OpenAddVarWindowListener(JFrame parentWindow, VariablesPanel varPanel, WorkingMemory wm) {
		this.varPanel = varPanel;
		this.window = parentWindow;
		this.wm = wm;
	}
	
	
	public void actionPerformed(ActionEvent e) {
		new NewVariableWindow(window, varPanel, wm).open();
	}
}
